package com.du;

import com.du.ext.ExtConfig;
import com.du.tx.TxConfig;
import com.du.tx.UserService;
import org.junit.Test;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author djg
 * @date 2020/11/23
 * @des
 */
public class IOCTestExt {

    @Test
    public void test01() {
        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(ExtConfig.class);
        applicationContext.publishEvent(new ApplicationEvent("我发布了一个事件") {});
        applicationContext.close();

    }
}
